<template>
  <div class="ProductPurchase">
    <div class="TitleTop">
      <div class="TitleLeft">
        <h1>选择适合你的Mesee Care+计划。</h1>
        <p>选择适合你的服务并应用到你的商业团队上。</p>
      </div>
      <TitleRight></TitleRight>
    </div>
    <div class="MainContent">
      <div class="piecemealONE">
        <div class="TitleTopP">
          <h1>选购全新的MeSee Care+计划</h1>
          <p>充满创意的服务与产品，轻松应对商业需求，获得无尽创作灵感。</p>
          <p>现在可以享受9折的特别商务优惠。</p>
        </div>
        <div class="TitleBottomPlittop">
          <!-- left -->
          <div>
            <h3>包含如下产品或服务</h3>
            <ul>
              <li>· 多达100次视频模板创作机会</li>
              <li>· 多达100,000字配音字符上限补充</li>
              <li>· 7张全景照片拍摄服务以及3张全景节点</li>
            </ul>
          </div>
          <!-- right -->
          <div>
            <!-- 框子 -->
            <div :class="{ isChoice: isChoice == 0 }" @click="isChoice = 0">
              <!-- 内部分开两遍 123 -->
              <div>
                <p>MeSee Care+</p>
                <p>RMB 9600/年</p>
              </div>
              <div>
                <p>及1年技术专家服务</p>
                <p>一年</p>
              </div>
            </div>
            <!-- 框子 -->
            <div :class="{ isChoice: isChoice == 1 }" @click="isChoice = 1">
              <div>
                <p>MeSee Care+</p>
                <p>RMB 15,000/2年</p>
              </div>
              <div>
                <p>及2年技术专家服务</p>
                <p>2年</p>
              </div>
            </div>
          </div>
        </div>
        <!-- &#62; -->
        <div class="TitleBottomPlitbot">
          <a href=""
            >继续了解MeSee Care+计划<i class="iconfont">&#xe678;</i>
          </a>
          <button class="blueBtn">选定并现在结算</button>
        </div>
      </div>
      <div class="piecemealTWO">
        <div>
          <h1>全景拍摄增量</h1>
          <p>每套包含10张全景拍摄</p>
          <p>赠品:3张连接照片</p>
        </div>
        <div>
          <p>需开通过MeSee Care+</p>
          <p>享受9折商务优惠</p>
        </div>
        <div>
          <!-- <div class="kONE thisFocus">
            <p>购买量</p>
            <input type="text" autocomplete="off" />
          </div> -->
          <DynamicButton
            class="kOne"
            :title="'购买量'"
            v-model="buy1"
          ></DynamicButton>
          <button class="blueBtn">RMB 600/10张 购买</button>
        </div>
      </div>
      <div class="piecemealTHREE">
        <!-- 上部分 -->
        <div class="piecemealTHREETOP">
          <h1>视频创意增量</h1>
          <p>每套包含30次创意市场模板使用机会</p>
          <p>额外赠送5次机会</p>
          <div>
            <DynamicButton
              class="kTwo"
              :title="'购买量'"
              v-model="buy2"
            ></DynamicButton>
            <button class="blueBtn" :class="{ hide: !buy2 }" @click="topayFun">
              <div>RMB 600</div>
              <span>购买</span>
            </button>
          </div>
        </div>
        <!-- 下部分 -->
        <div class="piecemealTHREEBOT">
          <h1>配音字数增量</h1>
          <p>每套包含10,000字配音字符扩充</p>
          <p>额外赠送500字</p>
          <div>
            <DynamicButton
              class="kTwo"
              :title="'购买量'"
              v-model="buy3"
            ></DynamicButton>
            <button class="blueBtn" :class="{ hide: !buy3 }">
              <div>RMB 600</div>
              <span>购买</span>
            </button>
          </div>
        </div>
      </div>
    </div>
    <MyPupop v-model="tanchuang">
      <div class="pupopMainContent">
        <div>
          <h1>抱歉，无法重新开通</h1>
          <p>我们查询到你有过MeSee Care+的开通记录，所以无法重新开通</p>
        </div>
        <div>
          <p class="btnTopText">MeSee Care+技术支持 RMB 3280/年</p>
          <button class="blueBtn">续期技术支持</button>
        </div>
      </div>
    </MyPupop>
  </div>
</template>

<script>
import DynamicButton from '../MyComponents/DynamicButton.vue'
import MyPupop from '../MyComponents/YPublicPopup.vue'
export default {
  components: {
    DynamicButton,
    MyPupop,
  },
  data() {
    return {

      isChoice: 0,
      tanchuang: false,
      buy1: '',
      buy2: '',
      buy3: '',
    }
  },

  methods: {
    topayFun() {
      this.$emit('topayFun')
    }
  },

  beforeRouteUpdate(to, from, next) {
    console.log(789)
  },
  beforeRouteLeave(to, from, next) {
    console.log(to);
    console.log(from)
    next()
  },
  beforeDestory() {
    console.log('我将要被销毁')
  },
  destroyed() {
    console.log('我已销毁')
  }
}
</script>

<style lang="scss" scoped>
$blue_color: #007aff;
$blue_btnBg: #0767fa;
i {
  font-style: normal;
  color: $blue_color;
}

.ProductPurchase {
  width: 100%;
  height: 100%;
  position: relative;
  .TitleTop {
    width: 100%;
    height: auto;
    display: flex;
    justify-content: space-between;
    align-content: center;
    align-items: center;
    box-sizing: border-box;
    .TitleLeft {
      width: auto;
      h1 {
        font-size: 30px;
        font-family: pfm;
        font-weight: 500;
        color: rgba(0, 0, 0, 0.85);
        margin-bottom: 10px;
      }
      p {
        font-size: 16px;
        font-family: pfr;
        font-weight: 400;
        color: rgba(0, 0, 0, 0.85);
        line-height: 22px;
      }
    }
  }
  .MainContent {
    width: 100%;
    height: auto;
    margin-top: 70px;
    display: flex;
    justify-content: space-between;
    
    .piecemealONE {
      //第一块
      width: 760px;
      height: 450px;
      background: #ffffff;
      box-shadow: 0px 10px 10px 0px rgba(0, 0, 0, 0.02);
      border-radius: 20px;
      border: 2px solid #f2f2f2;
      // caps
      transition: border 0.3s ease-in-out;
      box-sizing: border-box;
      padding: 45px;
      display: flex;
      flex-direction: column;
      justify-content: space-between;
      align-content: center;
      align-items: center;
      &:hover {
        border-color: #007aff;
      }
      .TitleTopP {
        //   上边部分
        width: 100%;
        bottom: 1px solid red;
        h1 {
          font-size: 30px;
          font-family: pfm;
          font-weight: 500;
          color: rgba(0, 0, 0, 0.85);
          line-height: 42px;
          margin-bottom: 10px;
        }
        p {
          font-size: 16px;
          font-family: pfr;
          font-weight: 400;
          color: rgba(0, 0, 0, 0.85);
          line-height: 22px;
        }
      }
      .TitleBottomPlittop {
        //   下上部分
        width: 100%;
        display: flex;
        justify-content: space-between;
        margin-top: 30px;
        // 左右两边
        > div {
          width: auto;
          height: auto;
          &:first-child {
            h3 {
              font-size: 16px;
              font-family: pfs;
              font-weight: 600;
              color: rgba(0, 0, 0, 0.85);
              line-height: 22px;
              margin-bottom: 18px;
            }
            ul {
              list-style: none;
              li {
                font-size: 16px;
                font-family: pfr;
                font-weight: 400;
                color: rgba(0, 0, 0, 0.85);
                line-height: 22px;
                margin-bottom: 10px;
              }
            }
          }
          &:last-child {
            //   上下两个蓝框 123
            > div {
              width: 320px;
              height: 70px;
              border-radius: 10px;
              border: 2px solid rgba(0, 0, 0, 0.35);
              box-sizing: border-box;
              padding: 12px 17px;
              transition: all 0.3s ease-out;
              cursor: pointer;
              // 7ab1fd
              &.isChoice {
                border-color: #007aff;
                box-shadow: 0 0 0px 3px #7ab1fd;
              }
              &:first-child {
                margin-bottom: 20px;
              }
              > div {
                display: flex;
                width: 100%;
                height: auto;
                justify-content: space-between;
                flex-wrap: nowrap;
                margin: 0;
                padding: 0;
                &:first-child p {
                  font-size: 16px;
                  font-family: pfm;
                  font-weight: 500;
                  color: rgba(0, 0, 0, 0.85);
                  line-height: 22px;
                  margin-bottom: 4px;
                  white-space: nowrap;
                }
                &:last-child p {
                  font-size: 12px;
                  font-family: pfm;
                  font-weight: 500;
                  color: rgba(0, 0, 0, 0.85);
                  line-height: 17px;
                  white-space: nowrap;
                }
              }
            }
          }
        }
      }
      .TitleBottomPlitbot {
        //   下下部分
        width: 100%;
        display: flex;
        justify-content: space-between;
        align-content: center;
        align-items: center;
        height: auto;
        margin-top: 16px;
        a {
          font-size: 16px;
          font-family: pfm;
          font-weight: 500;
          color: $blue_color;
          line-height: 22px;
          text-decoration: none;
          i {
            display: inline-block;
            font-size: 14px;
          }
        }
        button {
          width: 320px;
          height: 45px;
          //   background: $blue_btnBg;
          border-radius: 10px;
          border: none;
          outline: none;
          font-family: pfr;
          font-weight: 400;
          color: #ffffff;
        }
      }
    }
    .piecemealTWO {
      // 第二块
      width: 225px;
      height: 450px;
      background: #ffffff;
      box-shadow: 0px 10px 10px 0px rgba(0, 0, 0, 0.02);
      border-radius: 20px;
      border: 2px solid #f2f2f2;
      // caps
      transition: border 0.3s ease-in-out;
      text-align: center;
      padding: 47px 19px 27px;
      display: flex;
      flex-direction: column;
      justify-content: space-between;
      align-items: center;
      align-content: center;
      // margin: 0 20px;
      &:hover {
        border-color: #007aff;
      }
      > div:nth-child(1) {
        text-align: center;
        h1 {
          font-size: 25px;
          font-family: pfm;
          font-weight: 500;
          color: rgba(0, 0, 0, 0.85);
          line-height: 36px;
          margin-bottom: 10px;
        }
        p {
          font-size: 16px;
          font-family: pfr;
          font-weight: 400;
          color: rgba(0, 0, 0, 0.85);
          line-height: 22px;
          margin-top: 10px;
        }
      }
      > div:nth-child(2) p {
        text-align: center;
        font-size: 14px;
        font-family: pfr;
        font-weight: 400;
        color: $blue_color;
        line-height: 20px;
        margin-top: 5px;
      }
      > div:nth-child(3) {
        .DynamicButton {
          width: 185px;
          height: 64px;
        }
        .kOne {
          width: 185px;
          height: 46px;
        }
        // .kONE {
        //   width: 185px;
        //   height: 63px;
        //   border-radius: 10px;
        //   border: 2px solid #7ab1fd;
        //   box-sizing: border-box;
        //   padding: 0 12px;
        //   padding-top: 7px;
        //   text-align: left;
        //   cursor: text;
        //   overflow: hidden;
        //   &.thisFocus {
        //     p {
        //       font-size: 30px;
        //     }
        //   }
        //   p {
        //     font-size: 12px;
        //     font-family: pfr;
        //     font-weight: 400;
        //     color: #007aff;
        //     display: inline-block;
        //     transition: fontSize, font-size 0.5s;
        //   }
        //   input {
        //     outline: none;
        //     font-size: 16px;
        //     font-family: pfm;
        //     font-weight: 500;
        //     color: rgba(0, 0, 0, 0.85);
        //     border: none;
        //     padding: 0;
        //     width: 100%;
        //   }
        // }
        button {
          width: 185px;
          height: 45px;
          //   background: $blue_btnBg;
          border-radius: 10px;
          font-size: 14px;
          font-family: pfm;
          font-weight: 500;
          color: #ffffff;
          margin-top: 26px;
        }
      }
    }
    .piecemealTHREE {
      // 第三部分
      width: 400px;
      height: 450px;
      > div {
        width: 100%;
        height: 215px;
        background: #ffffff;
        box-shadow: 0px 10px 10px 0px rgba(0, 0, 0, 0.02);
        border-radius: 20px;
        border: 2px solid #f2f2f2;
        // caps
        transition: border 0.3s ease-in-out;
        box-sizing: border-box;
        padding: 28px 20px;
        display: flex;
        justify-content: space-between;
        flex-direction: column;
        align-items: flex-start;
        &:hover {
          border-color: #007aff;
        }
        h1 {
          font-size: 22px;
          font-family: pfm;
          font-weight: 500;
          color: rgba(0, 0, 0, 0.85);
          line-height: 30px;
        }
        p {
          font-size: 14px;
          font-family: pfr;
          font-weight: 400;
          color: rgba(0, 0, 0, 0.85);
          line-height: 20px;
        }
        > div {
          width: 100%;
          display: flex;
          justify-content: space-between;
          .kTwo {
            flex: 1;
            // width: 68%;
            height: 46px;
            margin-right: 15px;
          }

          button {
            width: 99px;
            height: 64px;
            border-radius: 10px;
            border: none;
            outline: none;
            padding-right: 16px;
            text-align: right;
            transition: all 0.3s ease-out;
            opacity: 1;
            transform: scale(1);
            div,
            span {
              font-size: 14px;
              font-family: pfm;
              font-weight: 500;
              color: #ffffff;
              line-height: 20px;
              white-space: nowrap;
            }
          }
          .hide {
            opacity: 0;
            transform: scale(0.1);
          }
        }
      }
      .piecemealTHREETOP {
        //   上半部分
        margin-bottom: 20px;
      }
    }
  }
}
// 弹窗部分
.pupopMainContent {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  align-content: center;
  padding-bottom: 60px;
}
</style>